home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Diversos / rocketcar2.swf / scripts / frame_44 / PlaceObject3_1036_294 / CLIPACTIONRECORD onClipEvent(load).as < prev   
Encoding:
Text File  |  2008-09-24  |  1.4 KB  |  72 lines

  1. onClipEvent(load){
  2.    function changeDir()
  3.    {
  4.       dir = random(2);
  5.       if(dir == 0)
  6.       {
  7.          dir = "left";
  8.       }
  9.       if(dir == 1)
  10.       {
  11.          dir = "right";
  12.       }
  13.    }
  14.    function bomb()
  15.    {
  16.       if(_root.paused)
  17.       {
  18.          return undefined;
  19.       }
  20.       if(health <= 0)
  21.       {
  22.          return undefined;
  23.       }
  24.       dir = "wait";
  25.       type = "bomb3";
  26.       c = random(3);
  27.       if(c == 0)
  28.       {
  29.          i = 0;
  30.          while(i < random(4) + 2)
  31.          {
  32.             var _loc2_ = type + i;
  33.             _root.depthHolder = _root.depthHolder + 1;
  34.             _root.attachMovie(type,_loc2_,random(100000));
  35.             _root[_loc2_]._x = _X;
  36.             _root[_loc2_]._y = _Y + 50;
  37.             i++;
  38.          }
  39.       }
  40.       if(c == 1 or c == 2)
  41.       {
  42.          timeB = true;
  43.       }
  44.    }
  45.    if(_root.sound)
  46.    {
  47.       begin = new Sound(this);
  48.       begin.attachSound("fboss1");
  49.       begin.start();
  50.       ufoS = new Sound(this);
  51.       ufoS.attachSound("ufo");
  52.       ufoS.start(0,9999);
  53.       explode1 = new Sound(this);
  54.       explode1.attachSound("explode2");
  55.       explode = new Sound(this);
  56.       explode.attachSound("explode1");
  57.    }
  58.    health = 100;
  59.    damage = false;
  60.    speed = 4;
  61.    delay = 7500;
  62.    resetTime = getTimer() + delay;
  63.    time = 0;
  64.    t = 0;
  65.    changeDir();
  66.    i = 1;
  67.    _root.boss = this;
  68.    timeB = false;
  69.    bombs = 0;
  70.    time = 0;
  71. }
  72.